package com.bwie.controller;

import com.bwie.common.result.Result;
import com.bwie.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className: MenuController
 * @Description: TODO
 * @version: v1.８.0
 * @author: 张雨乐
 * @date: 2025/9/27 19:36
 */
@CrossOrigin
@RestController
public class MenuController {
    @Autowired
    MenuService menuService;

    /**
     * 角色选择
     * @param roleId
     * @return
     */

    @GetMapping("role/{roleId}")
    public Result role(@PathVariable String roleId){
        return menuService.role(roleId);
    }
    /**
     * 角色选择
     * @param
     * * @return
     */
    @GetMapping("menu")
    public Result menu(){
        return menuService.menu();
    }

}
